peg-tests.el: Fix test failures
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 13 Apr 2024 19:35:46 +0000 (15:35 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 13 Apr 2024 19:35:46 +0000 (15:35 -0400)
commit7b94c6b00b287d2b69d466380a05de7e0ec21ee9
tree7692f4f8a09d3eaa08f80ee582c82f974ef30ab9
parent17e26cf57e18c5df2172a7049591d89fc53b3fb6
peg-tests.el: Fix test failures

* lisp/progmodes/peg.el (peg-parse): Refine heuristic since unknown
terminals are resolved at run-time rather than compile-time now.
(peg--macroexpand) <stack-action>: Avoid generating a `let` with an
empty body.
(peg--translate-rule-body): Adjust to name change of
`macroexp-warn-and-return` and the fact that it's always available.

* test/lisp/progmodes/peg-tests.el (peg-parse-string):
Add `indent` declaration.
(peg-test): Check that the compiler emits the warnings we expect.
lisp/progmodes/peg.el
test/lisp/progmodes/peg-tests.el